home *** CD-ROM | disk | FTP | other *** search
- property respSndList, respSndSource
-
- on new me
- return me
- end
-
- ----------------------------------------------------------------------------------------------------
- --respondSounds ligger i castlib 3 internt, k├╢rs i kanal 2, laddas in automatiskt om dom finns.
-
- on respondSnd me, pRandom, pList, pDelete, pRecover
- if random(pRandom) = 1 then
- if soundBusy(2) = 1 then
- exit
- else
- if respSndList[pList].count > 0 then
- Num = respSndList[pList].count
- choise = random(Num)
- sound(2).play(member(respSndList[pList][choise], 3))
- if pDelete = 1 then
- respSndList[pList].deleteAt(choise)
- end if
- if respSndList[pList].count = 0 and pRecover = 1 then
- me.readRespondList(pList)
- end if
- end if
- end if
- end if
- end
-
- on readRespondList me, pList
- respSndList[pList] = respSndSource[pList]
- end
-
- on initRespondlist me
- respSndList = []
- respSndSource = []
- num = (the number of members of castlib 3)
- if member(num, 3).type <> #sound then
- num = (the number of members of castlib 3) - 1
- end if
- listNum = (value(member(num, 3).name))[1]
- repeat with n = 1 to listNum
- respSndList[n] = []
- respSndSource[n] = []
- end repeat
- repeat with n = 1 to num
- if member(n, 3).type = #sound then
- nomen = value(member(n, 3).name)
- respSndList[nomen[1]][nomen[2]] = member(n, 3).name
- respSndSource[nomen[1]][nomen[2]] = member(n, 3).name
- end if
- end repeat
- end
-
-
- -------------------------- -------------------------- -------------------------- --------------------------